home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / binutils.7 / binutils / binutils-2.7 / gas / doc / as.info-2 < prev    next >
Encoding:
GNU Info File  |  1996-07-15  |  49.5 KB  |  1,437 lines

  1. This is Info file as.info, produced by Makeinfo-1.55 from the input
  2. file ./as.texinfo.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * As: (as).                     The GNU assembler.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    This file documents the GNU Assembler "as".
  9.  
  10.    Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation,
  11. Inc.
  12.  
  13.    Permission is granted to make and distribute verbatim copies of this
  14. manual provided the copyright notice and this permission notice are
  15. preserved on all copies.
  16.  
  17.    Permission is granted to copy and distribute modified versions of
  18. this manual under the conditions for verbatim copying, provided that
  19. the entire resulting derived work is distributed under the terms of a
  20. permission notice identical to this one.
  21.  
  22.    Permission is granted to copy and distribute translations of this
  23. manual into another language, under the above conditions for modified
  24. versions.
  25.  
  26. 
  27. File: as.info,  Node: Ld Sections,  Next: As Sections,  Prev: Secs Background,  Up: Sections
  28.  
  29. ld Sections
  30. ===========
  31.  
  32.    `ld' deals with just four kinds of sections, summarized below.
  33.  
  34. *named sections*
  35. *text section*
  36. *data section*
  37.      These sections hold your program.  `as' and `ld' treat them as
  38.      separate but equal sections.  Anything you can say of one section
  39.      is true another.  When the program is running, however, it is
  40.      customary for the text section to be unalterable.  The text
  41.      section is often shared among processes: it contains instructions,
  42.      constants and the like.  The data section of a running program is
  43.      usually alterable: for example, C variables would be stored in the
  44.      data section.
  45.  
  46. *bss section*
  47.      This section contains zeroed bytes when your program begins
  48.      running.  It is used to hold unitialized variables or common
  49.      storage.  The length of each partial program's bss section is
  50.      important, but because it starts out containing zeroed bytes there
  51.      is no need to store explicit zero bytes in the object file.  The
  52.      bss section was invented to eliminate those explicit zeros from
  53.      object files.
  54.  
  55. *absolute section*
  56.      Address 0 of this section is always "relocated" to runtime address
  57.      0.  This is useful if you want to refer to an address that `ld'
  58.      must not change when relocating.  In this sense we speak of
  59.      absolute addresses being "unrelocatable": they do not change
  60.      during relocation.
  61.  
  62. *undefined section*
  63.      This "section" is a catch-all for address references to objects
  64.      not in the preceding sections.
  65.  
  66.    An idealized example of three relocatable sections follows.  The
  67. example uses the traditional section names `.text' and `.data'.  Memory
  68. addresses are on the horizontal axis.
  69.  
  70.                            +-----+----+--+
  71.      partial program # 1:  |ttttt|dddd|00|
  72.                            +-----+----+--+
  73.      
  74.                            text   data bss
  75.                            seg.   seg. seg.
  76.      
  77.                            +---+---+---+
  78.      partial program # 2:  |TTT|DDD|000|
  79.                            +---+---+---+
  80.      
  81.                            +--+---+-----+--+----+---+-----+~~
  82.      linked program:       |  |TTT|ttttt|  |dddd|DDD|00000|
  83.                            +--+---+-----+--+----+---+-----+~~
  84.      
  85.          addresses:        0 ...
  86.  
  87. 
  88. File: as.info,  Node: As Sections,  Next: Sub-Sections,  Prev: Ld Sections,  Up: Sections
  89.  
  90. as Internal Sections
  91. ====================
  92.  
  93.    These sections are meant only for the internal use of `as'.  They
  94. have no meaning at run-time.  You do not really need to know about these
  95. sections for most purposes; but they can be mentioned in `as' warning
  96. messages, so it might be helpful to have an idea of their meanings to
  97. `as'.  These sections are used to permit the value of every expression
  98. in your assembly language program to be a section-relative address.
  99.  
  100. ASSEMBLER-INTERNAL-LOGIC-ERROR!
  101.      An internal assembler logic error has been found.  This means
  102.      there is a bug in the assembler.
  103.  
  104. expr section
  105.      The assembler stores complex expression internally as combinations
  106.      of symbols.  When it needs to represent an expression as a symbol,
  107.      it puts it in the expr section.
  108.  
  109. 
  110. File: as.info,  Node: Sub-Sections,  Next: bss,  Prev: As Sections,  Up: Sections
  111.  
  112. Sub-Sections
  113. ============
  114.  
  115.    Assembled bytes conventionally fall into two sections: text and data.
  116. You may have separate groups of data in named sections that you want to
  117. end up near to each other in the object file, even though they are not
  118. contiguous in the assembler source.  `as' allows you to use
  119. "subsections" for this purpose.  Within each section, there can be
  120. numbered subsections with values from 0 to 8192.  Objects assembled
  121. into the same subsection go into the object file together with other
  122. objects in the same subsection.  For example, a compiler might want to
  123. store constants in the text section, but might not want to have them
  124. interspersed with the program being assembled.  In this case, the
  125. compiler could issue a `.text 0' before each section of code being
  126. output, and a `.text 1' before each group of constants being output.
  127.  
  128.    Subsections are optional.  If you do not use subsections, everything
  129. goes in subsection number zero.
  130.  
  131.    Each subsection is zero-padded up to a multiple of four bytes.
  132. (Subsections may be padded a different amount on different flavors of
  133. `as'.)
  134.  
  135.    Subsections appear in your object file in numeric order, lowest
  136. numbered to highest.  (All this to be compatible with other people's
  137. assemblers.) The object file contains no representation of subsections;
  138. `ld' and other programs that manipulate object files see no trace of
  139. them.  They just see all your text subsections as a text section, and
  140. all your data subsections as a data section.
  141.  
  142.    To specify which subsection you want subsequent statements assembled
  143. into, use a numeric argument to specify it, in a `.text EXPRESSION' or
  144. a `.data EXPRESSION' statement.  When generating COFF output, you can
  145. also use an extra subsection argument with arbitrary named sections:
  146. `.section NAME, EXPRESSION'.  EXPRESSION should be an absolute
  147. expression.  (*Note Expressions::.)  If you just say `.text' then
  148. `.text 0' is assumed.  Likewise `.data' means `.data 0'.  Assembly
  149. begins in `text 0'.  For instance:
  150.      .text 0     # The default subsection is text 0 anyway.
  151.      .ascii "This lives in the first text subsection. *"
  152.      .text 1
  153.      .ascii "But this lives in the second text subsection."
  154.      .data 0
  155.      .ascii "This lives in the data section,"
  156.      .ascii "in the first data subsection."
  157.      .text 0
  158.      .ascii "This lives in the first text section,"
  159.      .ascii "immediately following the asterisk (*)."
  160.  
  161.    Each section has a "location counter" incremented by one for every
  162. byte assembled into that section.  Because subsections are merely a
  163. convenience restricted to `as' there is no concept of a subsection
  164. location counter.  There is no way to directly manipulate a location
  165. counter--but the `.align' directive changes it, and any label
  166. definition captures its current value.  The location counter of the
  167. section where statements are being assembled is said to be the "active"
  168. location counter.
  169.  
  170. 
  171. File: as.info,  Node: bss,  Prev: Sub-Sections,  Up: Sections
  172.  
  173. bss Section
  174. ===========
  175.  
  176.    The bss section is used for local common variable storage.  You may
  177. allocate address space in the bss section, but you may not dictate data
  178. to load into it before your program executes.  When your program starts
  179. running, all the contents of the bss section are zeroed bytes.
  180.  
  181.    Addresses in the bss section are allocated with special directives;
  182. you may not assemble anything directly into the bss section.  Hence
  183. there are no bss subsections. *Note `.comm': Comm, *note `.lcomm':
  184. Lcomm..
  185.  
  186. 
  187. File: as.info,  Node: Symbols,  Next: Expressions,  Prev: Sections,  Up: Top
  188.  
  189. Symbols
  190. *******
  191.  
  192.    Symbols are a central concept: the programmer uses symbols to name
  193. things, the linker uses symbols to link, and the debugger uses symbols
  194. to debug.
  195.  
  196.      *Warning:* `as' does not place symbols in the object file in the
  197.      same order they were declared.  This may break some debuggers.
  198.  
  199. * Menu:
  200.  
  201. * Labels::                      Labels
  202. * Setting Symbols::             Giving Symbols Other Values
  203. * Symbol Names::                Symbol Names
  204. * Dot::                         The Special Dot Symbol
  205. * Symbol Attributes::           Symbol Attributes
  206.  
  207. 
  208. File: as.info,  Node: Labels,  Next: Setting Symbols,  Up: Symbols
  209.  
  210. Labels
  211. ======
  212.  
  213.    A "label" is written as a symbol immediately followed by a colon
  214. `:'.  The symbol then represents the current value of the active
  215. location counter, and is, for example, a suitable instruction operand.
  216. You are warned if you use the same symbol to represent two different
  217. locations: the first definition overrides any other definitions.
  218.  
  219.    On the HPPA, the usual form for a label need not be immediately
  220. followed by a colon, but instead must start in column zero.  Only one
  221. label may be defined on a single line.  To work around this, the HPPA
  222. version of `as' also provides a special directive `.label' for defining
  223. labels more flexibly.
  224.  
  225. 
  226. File: as.info,  Node: Setting Symbols,  Next: Symbol Names,  Prev: Labels,  Up: Symbols
  227.  
  228. Giving Symbols Other Values
  229. ===========================
  230.  
  231.    A symbol can be given an arbitrary value by writing a symbol,
  232. followed by an equals sign `=', followed by an expression (*note
  233. Expressions::.).  This is equivalent to using the `.set' directive.
  234. *Note `.set': Set.
  235.  
  236. 
  237. File: as.info,  Node: Symbol Names,  Next: Dot,  Prev: Setting Symbols,  Up: Symbols
  238.  
  239. Symbol Names
  240. ============
  241.  
  242.    Symbol names begin with a letter or with one of `._'.  On most
  243. machines, you can also use `$' in symbol names; exceptions are noted in
  244. *Note Machine Dependencies::.  That character may be followed by any
  245. string of digits, letters, dollar signs (unless otherwise noted in
  246. *Note Machine Dependencies::), and underscores.  For the AMD 29K
  247. family, `?' is also allowed in the body of a symbol name, though not at
  248. its beginning.
  249.  
  250.    Case of letters is significant: `foo' is a different symbol name
  251. than `Foo'.
  252.  
  253.    Each symbol has exactly one name.  Each name in an assembly language
  254. program refers to exactly one symbol.  You may use that symbol name any
  255. number of times in a program.
  256.  
  257. Local Symbol Names
  258. ------------------
  259.  
  260.    Local symbols help compilers and programmers use names temporarily.
  261. There are ten local symbol names, which are re-used throughout the
  262. program.  You may refer to them using the names `0' `1' ... `9'.  To
  263. define a local symbol, write a label of the form `N:' (where N
  264. represents any digit).  To refer to the most recent previous definition
  265. of that symbol write `Nb', using the same digit as when you defined the
  266. label.  To refer to the next definition of a local label, write
  267. `Nf'--where N gives you a choice of 10 forward references.  The `b'
  268. stands for "backwards" and the `f' stands for "forwards".
  269.  
  270.    Local symbols are not emitted by the current GNU C compiler.
  271.  
  272.    There is no restriction on how you can use these labels, but
  273. remember that at any point in the assembly you can refer to at most 10
  274. prior local labels and to at most 10 forward local labels.
  275.  
  276.    Local symbol names are only a notation device.  They are immediately
  277. transformed into more conventional symbol names before the assembler
  278. uses them.  The symbol names stored in the symbol table, appearing in
  279. error messages and optionally emitted to the object file have these
  280. parts:
  281.  
  282. `L'
  283.      All local labels begin with `L'. Normally both `as' and `ld'
  284.      forget symbols that start with `L'. These labels are used for
  285.      symbols you are never intended to see.  If you use the `-L' option
  286.      then `as' retains these symbols in the object file. If you also
  287.      instruct `ld' to retain these symbols, you may use them in
  288.      debugging.
  289.  
  290. `DIGIT'
  291.      If the label is written `0:' then the digit is `0'.  If the label
  292.      is written `1:' then the digit is `1'.  And so on up through `9:'.
  293.  
  294. A'
  295.      This unusual character is included so you do not accidentally
  296.      invent a symbol of the same name.  The character has ASCII value
  297.      `\001'.
  298.  
  299. `*ordinal number*'
  300.      This is a serial number to keep the labels distinct.  The first
  301.      `0:' gets the number `1'; The 15th `0:' gets the number `15';
  302.      *etc.*.  Likewise for the other labels `1:' through `9:'.
  303.  
  304.    For instance, the first `1:' is named `LA1', the 44th `3:' is named
  305. `LA44'.
  306.  
  307. 
  308. File: as.info,  Node: Dot,  Next: Symbol Attributes,  Prev: Symbol Names,  Up: Symbols
  309.  
  310. The Special Dot Symbol
  311. ======================
  312.  
  313.    The special symbol `.' refers to the current address that `as' is
  314. assembling into.  Thus, the expression `melvin: .long .' defines
  315. `melvin' to contain its own address.  Assigning a value to `.' is
  316. treated the same as a `.org' directive.  Thus, the expression `.=.+4'
  317. is the same as saying `.space 4'.
  318.  
  319. 
  320. File: as.info,  Node: Symbol Attributes,  Prev: Dot,  Up: Symbols
  321.  
  322. Symbol Attributes
  323. =================
  324.  
  325.    Every symbol has, as well as its name, the attributes "Value" and
  326. "Type".  Depending on output format, symbols can also have auxiliary
  327. attributes.
  328.  
  329.    If you use a symbol without defining it, `as' assumes zero for all
  330. these attributes, and probably won't warn you.  This makes the symbol
  331. an externally defined symbol, which is generally what you would want.
  332.  
  333. * Menu:
  334.  
  335. * Symbol Value::                Value
  336. * Symbol Type::                 Type
  337.  
  338.  
  339. * a.out Symbols::               Symbol Attributes: `a.out'
  340.  
  341. * COFF Symbols::                Symbol Attributes for COFF
  342.  
  343. * SOM Symbols::                Symbol Attributes for SOM
  344.  
  345. 
  346. File: as.info,  Node: Symbol Value,  Next: Symbol Type,  Up: Symbol Attributes
  347.  
  348. Value
  349. -----
  350.  
  351.    The value of a symbol is (usually) 32 bits.  For a symbol which
  352. labels a location in the text, data, bss or absolute sections the value
  353. is the number of addresses from the start of that section to the label.
  354. Naturally for text, data and bss sections the value of a symbol changes
  355. as `ld' changes section base addresses during linking.  Absolute
  356. symbols' values do not change during linking: that is why they are
  357. called absolute.
  358.  
  359.    The value of an undefined symbol is treated in a special way.  If it
  360. is 0 then the symbol is not defined in this assembler source file, and
  361. `ld' tries to determine its value from other files linked into the same
  362. program.  You make this kind of symbol simply by mentioning a symbol
  363. name without defining it.  A non-zero value represents a `.comm' common
  364. declaration.  The value is how much common storage to reserve, in bytes
  365. (addresses).  The symbol refers to the first address of the allocated
  366. storage.
  367.  
  368. 
  369. File: as.info,  Node: Symbol Type,  Next: a.out Symbols,  Prev: Symbol Value,  Up: Symbol Attributes
  370.  
  371. Type
  372. ----
  373.  
  374.    The type attribute of a symbol contains relocation (section)
  375. information, any flag settings indicating that a symbol is external, and
  376. (optionally), other information for linkers and debuggers.  The exact
  377. format depends on the object-code output format in use.
  378.  
  379. 
  380. File: as.info,  Node: a.out Symbols,  Next: COFF Symbols,  Prev: Symbol Type,  Up: Symbol Attributes
  381.  
  382. Symbol Attributes: `a.out'
  383. --------------------------
  384.  
  385. * Menu:
  386.  
  387. * Symbol Desc::                 Descriptor
  388. * Symbol Other::                Other
  389.  
  390. 
  391. File: as.info,  Node: Symbol Desc,  Next: Symbol Other,  Up: a.out Symbols
  392.  
  393. Descriptor
  394. ..........
  395.  
  396.    This is an arbitrary 16-bit value.  You may establish a symbol's
  397. descriptor value by using a `.desc' statement (*note `.desc': Desc.).
  398. A descriptor value means nothing to `as'.
  399.  
  400. 
  401. File: as.info,  Node: Symbol Other,  Prev: Symbol Desc,  Up: a.out Symbols
  402.  
  403. Other
  404. .....
  405.  
  406.    This is an arbitrary 8-bit value.  It means nothing to `as'.
  407.  
  408. 
  409. File: as.info,  Node: COFF Symbols,  Next: SOM Symbols,  Prev: a.out Symbols,  Up: Symbol Attributes
  410.  
  411. Symbol Attributes for COFF
  412. --------------------------
  413.  
  414.    The COFF format supports a multitude of auxiliary symbol attributes;
  415. like the primary symbol attributes, they are set between `.def' and
  416. `.endef' directives.
  417.  
  418. Primary Attributes
  419. ..................
  420.  
  421.    The symbol name is set with `.def'; the value and type,
  422. respectively, with `.val' and `.type'.
  423.  
  424. Auxiliary Attributes
  425. ....................
  426.  
  427.    The `as' directives `.dim', `.line', `.scl', `.size', and `.tag' can
  428. generate auxiliary symbol table information for COFF.
  429.  
  430. 
  431. File: as.info,  Node: SOM Symbols,  Prev: COFF Symbols,  Up: Symbol Attributes
  432.  
  433. Symbol Attributes for SOM
  434. -------------------------
  435.  
  436.    The SOM format for the HPPA supports a multitude of symbol
  437. attributes set with the `.EXPORT' and `.IMPORT' directives.
  438.  
  439.    The attributes are described in `HP9000 Series 800 Assembly Language
  440. Reference Manual' (HP 92432-90001) under the `IMPORT' and `EXPORT'
  441. assembler directive documentation.
  442.  
  443. 
  444. File: as.info,  Node: Expressions,  Next: Pseudo Ops,  Prev: Symbols,  Up: Top
  445.  
  446. Expressions
  447. ***********
  448.  
  449.    An "expression" specifies an address or numeric value.  Whitespace
  450. may precede and/or follow an expression.
  451.  
  452.    The result of an expression must be an absolute number, or else an
  453. offset into a particular section.  If an expression is not absolute,
  454. and there is not enough information when `as' sees the expression to
  455. know its section, a second pass over the source program might be
  456. necessary to interpret the expression--but the second pass is currently
  457. not implemented.  `as' aborts with an error message in this situation.
  458.  
  459. * Menu:
  460.  
  461. * Empty Exprs::                 Empty Expressions
  462. * Integer Exprs::               Integer Expressions
  463.  
  464. 
  465. File: as.info,  Node: Empty Exprs,  Next: Integer Exprs,  Up: Expressions
  466.  
  467. Empty Expressions
  468. =================
  469.  
  470.    An empty expression has no value: it is just whitespace or null.
  471. Wherever an absolute expression is required, you may omit the
  472. expression, and `as' assumes a value of (absolute) 0.  This is
  473. compatible with other assemblers.
  474.  
  475. 
  476. File: as.info,  Node: Integer Exprs,  Prev: Empty Exprs,  Up: Expressions
  477.  
  478. Integer Expressions
  479. ===================
  480.  
  481.    An "integer expression" is one or more *arguments* delimited by
  482. *operators*.
  483.  
  484. * Menu:
  485.  
  486. * Arguments::                   Arguments
  487. * Operators::                   Operators
  488. * Prefix Ops::                  Prefix Operators
  489. * Infix Ops::                   Infix Operators
  490.  
  491. 
  492. File: as.info,  Node: Arguments,  Next: Operators,  Up: Integer Exprs
  493.  
  494. Arguments
  495. ---------
  496.  
  497.    "Arguments" are symbols, numbers or subexpressions.  In other
  498. contexts arguments are sometimes called "arithmetic operands".  In this
  499. manual, to avoid confusing them with the "instruction operands" of the
  500. machine language, we use the term "argument" to refer to parts of
  501. expressions only, reserving the word "operand" to refer only to machine
  502. instruction operands.
  503.  
  504.    Symbols are evaluated to yield {SECTION NNN} where SECTION is one of
  505. text, data, bss, absolute, or undefined.  NNN is a signed, 2's
  506. complement 32 bit integer.
  507.  
  508.    Numbers are usually integers.
  509.  
  510.    A number can be a flonum or bignum.  In this case, you are warned
  511. that only the low order 32 bits are used, and `as' pretends these 32
  512. bits are an integer.  You may write integer-manipulating instructions
  513. that act on exotic constants, compatible with other assemblers.
  514.  
  515.    Subexpressions are a left parenthesis `(' followed by an integer
  516. expression, followed by a right parenthesis `)'; or a prefix operator
  517. followed by an argument.
  518.  
  519. 
  520. File: as.info,  Node: Operators,  Next: Prefix Ops,  Prev: Arguments,  Up: Integer Exprs
  521.  
  522. Operators
  523. ---------
  524.  
  525.    "Operators" are arithmetic functions, like `+' or `%'.  Prefix
  526. operators are followed by an argument.  Infix operators appear between
  527. their arguments.  Operators may be preceded and/or followed by
  528. whitespace.
  529.  
  530. 
  531. File: as.info,  Node: Prefix Ops,  Next: Infix Ops,  Prev: Operators,  Up: Integer Exprs
  532.  
  533. Prefix Operator
  534. ---------------
  535.  
  536.    `as' has the following "prefix operators".  They each take one
  537. argument, which must be absolute.
  538.  
  539. `-'
  540.      "Negation".  Two's complement negation.
  541.  
  542. `~'
  543.      "Complementation".  Bitwise not.
  544.  
  545. 
  546. File: as.info,  Node: Infix Ops,  Prev: Prefix Ops,  Up: Integer Exprs
  547.  
  548. Infix Operators
  549. ---------------
  550.  
  551.    "Infix operators" take two arguments, one on either side.  Operators
  552. have precedence, but operations with equal precedence are performed left
  553. to right.  Apart from `+' or `-', both arguments must be absolute, and
  554. the result is absolute.
  555.  
  556.   1. Highest Precedence
  557.  
  558.     `*'
  559.           "Multiplication".
  560.  
  561.     `/'
  562.           "Division".  Truncation is the same as the C operator `/'
  563.  
  564.     `%'
  565.           "Remainder".
  566.  
  567.     `<'
  568.     `<<'
  569.           "Shift Left".  Same as the C operator `<<'.
  570.  
  571.     `>'
  572.     `>>'
  573.           "Shift Right".  Same as the C operator `>>'.
  574.  
  575.   2. Intermediate precedence
  576.  
  577.     `|'
  578.           "Bitwise Inclusive Or".
  579.  
  580.     `&'
  581.           "Bitwise And".
  582.  
  583.     `^'
  584.           "Bitwise Exclusive Or".
  585.  
  586.     `!'
  587.           "Bitwise Or Not".
  588.  
  589.   3. Lowest Precedence
  590.  
  591.     `+'
  592.           "Addition".  If either argument is absolute, the result has
  593.           the section of the other argument.  You may not add together
  594.           arguments from different sections.
  595.  
  596.     `-'
  597.           "Subtraction".  If the right argument is absolute, the result
  598.           has the section of the left argument.  If both arguments are
  599.           in the same section, the result is absolute.  You may not
  600.           subtract arguments from different sections.
  601.  
  602.    In short, it's only meaningful to add or subtract the *offsets* in an
  603. address; you can only have a defined section in one of the two
  604. arguments.
  605.  
  606. 
  607. File: as.info,  Node: Pseudo Ops,  Next: Machine Dependencies,  Prev: Expressions,  Up: Top
  608.  
  609. Assembler Directives
  610. ********************
  611.  
  612.    All assembler directives have names that begin with a period (`.').
  613. The rest of the name is letters, usually in lower case.
  614.  
  615.    This chapter discusses directives that are available regardless of
  616. the target machine configuration for the GNU assembler.  Some machine
  617. configurations provide additional directives.  *Note Machine
  618. Dependencies::.
  619.  
  620. * Menu:
  621.  
  622. * Abort::                       `.abort'
  623.  
  624. * ABORT::                       `.ABORT'
  625.  
  626. * Align::                       `.align ABS-EXPR , ABS-EXPR'
  627. * App-File::                    `.app-file STRING'
  628. * Ascii::                       `.ascii "STRING"'...
  629. * Asciz::                       `.asciz "STRING"'...
  630. * Balign::                      `.balign ABS-EXPR , ABS-EXPR'
  631. * Byte::                        `.byte EXPRESSIONS'
  632. * Comm::                        `.comm SYMBOL , LENGTH '
  633. * Data::                        `.data SUBSECTION'
  634.  
  635. * Def::                         `.def NAME'
  636.  
  637. * Desc::                        `.desc SYMBOL, ABS-EXPRESSION'
  638.  
  639. * Dim::                         `.dim'
  640.  
  641. * Double::                      `.double FLONUMS'
  642. * Eject::                       `.eject'
  643. * Else::                        `.else'
  644.  
  645. * Endef::                       `.endef'
  646.  
  647. * Endif::                       `.endif'
  648. * Equ::                         `.equ SYMBOL, EXPRESSION'
  649. * Extern::                      `.extern'
  650.  
  651. * File::                        `.file STRING'
  652.  
  653. * Fill::                        `.fill REPEAT , SIZE , VALUE'
  654. * Float::                       `.float FLONUMS'
  655. * Global::                      `.global SYMBOL', `.globl SYMBOL'
  656. * hword::                       `.hword EXPRESSIONS'
  657. * Ident::                       `.ident'
  658. * If::                          `.if ABSOLUTE EXPRESSION'
  659. * Include::                     `.include "FILE"'
  660. * Int::                         `.int EXPRESSIONS'
  661. * Irp::                `.irp SYMBOL,VALUES'...
  662. * Irpc::            `.irpc SYMBOL,VALUES'...
  663. * Lcomm::                       `.lcomm SYMBOL , LENGTH'
  664. * Lflags::                      `.lflags'
  665.  
  666. * Line::                        `.line LINE-NUMBER'
  667.  
  668. * Ln::                          `.ln LINE-NUMBER'
  669. * Linkonce::            `.linkonce [TYPE]'
  670. * List::                        `.list'
  671. * Long::                        `.long EXPRESSIONS'
  672.  
  673. * Macro::            `.macro NAME ARGS'...
  674. * MRI::                `.mri VAL'
  675.  
  676. * Nolist::                      `.nolist'
  677. * Octa::                        `.octa BIGNUMS'
  678. * Org::                         `.org NEW-LC , FILL'
  679. * P2align::                     `.p2align ABS-EXPR , ABS-EXPR'
  680. * Psize::                       `.psize LINES, COLUMNS'
  681. * Quad::                        `.quad BIGNUMS'
  682. * Rept::            `.rept COUNT'
  683. * Sbttl::                       `.sbttl "SUBHEADING"'
  684.  
  685. * Scl::                         `.scl CLASS'
  686.  
  687. * Section::                     `.section NAME, SUBSECTION'
  688.  
  689. * Set::                         `.set SYMBOL, EXPRESSION'
  690. * Short::                       `.short EXPRESSIONS'
  691. * Single::                      `.single FLONUMS'
  692.  
  693. * Size::                        `.size'
  694.  
  695. * Skip::                        `.skip SIZE , FILL'
  696. * Space::                       `.space SIZE , FILL'
  697.  
  698. * Stab::                        `.stabd, .stabn, .stabs'
  699.  
  700. * String::                      `.string "STR"'
  701.  
  702. * Tag::                         `.tag STRUCTNAME'
  703.  
  704. * Text::                        `.text SUBSECTION'
  705. * Title::                       `.title "HEADING"'
  706.  
  707. * Type::                        `.type INT'
  708. * Val::                         `.val ADDR'
  709.  
  710. * Word::                        `.word EXPRESSIONS'
  711. * Deprecated::                  Deprecated Directives
  712.  
  713. 
  714. File: as.info,  Node: Abort,  Next: ABORT,  Up: Pseudo Ops
  715.  
  716. `.abort'
  717. ========
  718.  
  719.    This directive stops the assembly immediately.  It is for
  720. compatibility with other assemblers.  The original idea was that the
  721. assembly language source would be piped into the assembler.  If the
  722. sender of the source quit, it could use this directive tells `as' to
  723. quit also.  One day `.abort' will not be supported.
  724.  
  725. 
  726. File: as.info,  Node: ABORT,  Next: Align,  Prev: Abort,  Up: Pseudo Ops
  727.  
  728. `.ABORT'
  729. ========
  730.  
  731.    When producing COFF output, `as' accepts this directive as a synonym
  732. for `.abort'.
  733.  
  734.    When producing `b.out' output, `as' accepts this directive, but
  735. ignores it.
  736.  
  737. 
  738. File: as.info,  Node: Align,  Next: App-File,  Prev: ABORT,  Up: Pseudo Ops
  739.  
  740. `.align ABS-EXPR , ABS-EXPR'
  741. ============================
  742.  
  743.    Pad the location counter (in the current subsection) to a particular
  744. storage boundary.  The first expression (which must be absolute) is the
  745. alignment required, as described below.  The second expression (also
  746. absolute) gives the value to be stored in the padding bytes.  It (and
  747. the comma) may be omitted.  If it is omitted, the padding bytes are
  748. zero.  For the alpha, if the section is marked as containing code and
  749. the padding expression is omitted, then the space is filled with no-ops.
  750.  
  751.    The way the required alignment is specified varies from system to
  752. system.  For the a29k, hppa, m68k, m88k, w65, sparc, and Hitachi SH,
  753. and i386 using ELF format, the first expression is the alignment
  754. request in bytes.  For example `.align 8' advances the location counter
  755. until it is a multiple of 8.  If the location counter is already a
  756. multiple of 8, no change is needed.
  757.  
  758.    For other systems, including the i386 using a.out format, it is the
  759. number of low-order zero bits the location counter must have after
  760. advancement.  For example `.align 3' advances the location counter
  761. until it a multiple of 8.  If the location counter is already a
  762. multiple of 8, no change is needed.
  763.  
  764.    This inconsistency is due to the different behaviors of the various
  765. native assemblers for these systems which GAS must emulate.  GAS also
  766. provides `.balign' and `.p2align' directives, described later, which
  767. have a consistent behavior across all architectures (but are specific
  768. to GAS).
  769.  
  770. 
  771. File: as.info,  Node: App-File,  Next: Ascii,  Prev: Align,  Up: Pseudo Ops
  772.  
  773. `.app-file STRING'
  774. ==================
  775.  
  776.    `.app-file' (which may also be spelled `.file') tells `as' that we
  777. are about to start a new logical file.  STRING is the new file name.
  778. In general, the filename is recognized whether or not it is surrounded
  779. by quotes `"'; but if you wish to specify an empty file name is
  780. permitted, you must give the quotes-`""'.  This statement may go away in
  781. future: it is only recognized to be compatible with old `as' programs.
  782.  
  783. 
  784. File: as.info,  Node: Ascii,  Next: Asciz,  Prev: App-File,  Up: Pseudo Ops
  785.  
  786. `.ascii "STRING"'...
  787. ====================
  788.  
  789.    `.ascii' expects zero or more string literals (*note Strings::.)
  790. separated by commas.  It assembles each string (with no automatic
  791. trailing zero byte) into consecutive addresses.
  792.  
  793. 
  794. File: as.info,  Node: Asciz,  Next: Balign,  Prev: Ascii,  Up: Pseudo Ops
  795.  
  796. `.asciz "STRING"'...
  797. ====================
  798.  
  799.    `.asciz' is just like `.ascii', but each string is followed by a
  800. zero byte.  The "z" in `.asciz' stands for "zero".
  801.  
  802. 
  803. File: as.info,  Node: Balign,  Next: Byte,  Prev: Asciz,  Up: Pseudo Ops
  804.  
  805. `.balign[wl] ABS-EXPR , ABS-EXPR'
  806. =================================
  807.  
  808.    Pad the location counter (in the current subsection) to a particular
  809. storage boundary.  The first expression (which must be absolute) is the
  810. alignment request in bytes.  For example `.balign 8' advances the
  811. location counter until it is a multiple of 8.  If the location counter
  812. is already a multiple of 8, no change is needed.
  813.  
  814.    The second expression (also absolute) gives the value to be stored in
  815. the padding bytes.  It (and the comma) may be omitted.  If it is
  816. omitted, the padding bytes are zero.
  817.  
  818.    The `.balignw' and `.balignl' directives are variants of the
  819. `.balign' directive.  The `.balignw' directive treats the fill pattern
  820. as a two byte word value.  The `.balignl' directives treats the fill
  821. pattern as a four byte longword value.  For example, `.balignw
  822. 4,0x368d' will align to a multiple of 4.  If it skips two bytes, they
  823. will be filled in with the value 0x368d (the exact placement of the
  824. bytes depends upon the endianness of the processor).  If it skips 1 or
  825. 3 bytes, the fill value is undefined.
  826.  
  827. 
  828. File: as.info,  Node: Byte,  Next: Comm,  Prev: Balign,  Up: Pseudo Ops
  829.  
  830. `.byte EXPRESSIONS'
  831. ===================
  832.  
  833.    `.byte' expects zero or more expressions, separated by commas.  Each
  834. expression is assembled into the next byte.
  835.  
  836. 
  837. File: as.info,  Node: Comm,  Next: Data,  Prev: Byte,  Up: Pseudo Ops
  838.  
  839. `.comm SYMBOL , LENGTH '
  840. ========================
  841.  
  842.    `.comm' declares a named common area in the bss section.  Normally
  843. `ld' reserves memory addresses for it during linking, so no partial
  844. program defines the location of the symbol.  Use `.comm' to tell `ld'
  845. that it must be at least LENGTH bytes long.  `ld' allocates space for
  846. each `.comm' symbol that is at least as long as the longest `.comm'
  847. request in any of the partial programs linked.  LENGTH is an absolute
  848. expression.
  849.  
  850.    The syntax for `.comm' differs slightly on the HPPA.  The syntax is
  851. `SYMBOL .comm, LENGTH'; SYMBOL is optional.
  852.  
  853. 
  854. File: as.info,  Node: Data,  Next: Def,  Prev: Comm,  Up: Pseudo Ops
  855.  
  856. `.data SUBSECTION'
  857. ==================
  858.  
  859.    `.data' tells `as' to assemble the following statements onto the end
  860. of the data subsection numbered SUBSECTION (which is an absolute
  861. expression).  If SUBSECTION is omitted, it defaults to zero.
  862.  
  863. 
  864. File: as.info,  Node: Def,  Next: Desc,  Prev: Data,  Up: Pseudo Ops
  865.  
  866. `.def NAME'
  867. ===========
  868.  
  869.    Begin defining debugging information for a symbol NAME; the
  870. definition extends until the `.endef' directive is encountered.
  871.  
  872.    This directive is only observed when `as' is configured for COFF
  873. format output; when producing `b.out', `.def' is recognized, but
  874. ignored.
  875.  
  876. 
  877. File: as.info,  Node: Desc,  Next: Dim,  Prev: Def,  Up: Pseudo Ops
  878.  
  879. `.desc SYMBOL, ABS-EXPRESSION'
  880. ==============================
  881.  
  882.    This directive sets the descriptor of the symbol (*note Symbol
  883. Attributes::.) to the low 16 bits of an absolute expression.
  884.  
  885.    The `.desc' directive is not available when `as' is configured for
  886. COFF output; it is only for `a.out' or `b.out' object format.  For the
  887. sake of compatibility, `as' accepts it, but produces no output, when
  888. configured for COFF.
  889.  
  890. 
  891. File: as.info,  Node: Dim,  Next: Double,  Prev: Desc,  Up: Pseudo Ops
  892.  
  893. `.dim'
  894. ======
  895.  
  896.    This directive is generated by compilers to include auxiliary
  897. debugging information in the symbol table.  It is only permitted inside
  898. `.def'/`.endef' pairs.
  899.  
  900.    `.dim' is only meaningful when generating COFF format output; when
  901. `as' is generating `b.out', it accepts this directive but ignores it.
  902.  
  903. 
  904. File: as.info,  Node: Double,  Next: Eject,  Prev: Dim,  Up: Pseudo Ops
  905.  
  906. `.double FLONUMS'
  907. =================
  908.  
  909.    `.double' expects zero or more flonums, separated by commas.  It
  910. assembles floating point numbers.  The exact kind of floating point
  911. numbers emitted depends on how `as' is configured.  *Note Machine
  912. Dependencies::.
  913.  
  914. 
  915. File: as.info,  Node: Eject,  Next: Else,  Prev: Double,  Up: Pseudo Ops
  916.  
  917. `.eject'
  918. ========
  919.  
  920.    Force a page break at this point, when generating assembly listings.
  921.  
  922. 
  923. File: as.info,  Node: Else,  Next: Endef,  Prev: Eject,  Up: Pseudo Ops
  924.  
  925. `.else'
  926. =======
  927.  
  928.    `.else' is part of the `as' support for conditional assembly; *note
  929. `.if': If..  It marks the beginning of a section of code to be
  930. assembled if the condition for the preceding `.if' was false.
  931.  
  932. 
  933. File: as.info,  Node: Endef,  Next: Endif,  Prev: Else,  Up: Pseudo Ops
  934.  
  935. `.endef'
  936. ========
  937.  
  938.    This directive flags the end of a symbol definition begun with
  939. `.def'.
  940.  
  941.    `.endef' is only meaningful when generating COFF format output; if
  942. `as' is configured to generate `b.out', it accepts this directive but
  943. ignores it.
  944.  
  945. 
  946. File: as.info,  Node: Endif,  Next: Equ,  Prev: Endef,  Up: Pseudo Ops
  947.  
  948. `.endif'
  949. ========
  950.  
  951.    `.endif' is part of the `as' support for conditional assembly; it
  952. marks the end of a block of code that is only assembled conditionally.
  953. *Note `.if': If.
  954.  
  955. 
  956. File: as.info,  Node: Equ,  Next: Extern,  Prev: Endif,  Up: Pseudo Ops
  957.  
  958. `.equ SYMBOL, EXPRESSION'
  959. =========================
  960.  
  961.    This directive sets the value of SYMBOL to EXPRESSION.  It is
  962. synonymous with `.set'; *note `.set': Set..
  963.  
  964.    The syntax for `equ' on the HPPA is `SYMBOL .equ EXPRESSION'.
  965.  
  966. 
  967. File: as.info,  Node: Extern,  Next: File,  Prev: Equ,  Up: Pseudo Ops
  968.  
  969. `.extern'
  970. =========
  971.  
  972.    `.extern' is accepted in the source program--for compatibility with
  973. other assemblers--but it is ignored.  `as' treats all undefined symbols
  974. as external.
  975.  
  976. 
  977. File: as.info,  Node: File,  Next: Fill,  Prev: Extern,  Up: Pseudo Ops
  978.  
  979. `.file STRING'
  980. ==============
  981.  
  982.    `.file' (which may also be spelled `.app-file') tells `as' that we
  983. are about to start a new logical file.  STRING is the new file name.
  984. In general, the filename is recognized whether or not it is surrounded
  985. by quotes `"'; but if you wish to specify an empty file name, you must
  986. give the quotes-`""'.  This statement may go away in future: it is only
  987. recognized to be compatible with old `as' programs.  In some
  988. configurations of `as', `.file' has already been removed to avoid
  989. conflicts with other assemblers.  *Note Machine Dependencies::.
  990.  
  991. 
  992. File: as.info,  Node: Fill,  Next: Float,  Prev: File,  Up: Pseudo Ops
  993.  
  994. `.fill REPEAT , SIZE , VALUE'
  995. =============================
  996.  
  997.    RESULT, SIZE and VALUE are absolute expressions.  This emits REPEAT
  998. copies of SIZE bytes.  REPEAT may be zero or more.  SIZE may be zero or
  999. more, but if it is more than 8, then it is deemed to have the value 8,
  1000. compatible with other people's assemblers.  The contents of each REPEAT
  1001. bytes is taken from an 8-byte number.  The highest order 4 bytes are
  1002. zero.  The lowest order 4 bytes are VALUE rendered in the byte-order of
  1003. an integer on the computer `as' is assembling for.  Each SIZE bytes in
  1004. a repetition is taken from the lowest order SIZE bytes of this number.
  1005. Again, this bizarre behavior is compatible with other people's
  1006. assemblers.
  1007.  
  1008.    SIZE and VALUE are optional.  If the second comma and VALUE are
  1009. absent, VALUE is assumed zero.  If the first comma and following tokens
  1010. are absent, SIZE is assumed to be 1.
  1011.  
  1012. 
  1013. File: as.info,  Node: Float,  Next: Global,  Prev: Fill,  Up: Pseudo Ops
  1014.  
  1015. `.float FLONUMS'
  1016. ================
  1017.  
  1018.    This directive assembles zero or more flonums, separated by commas.
  1019. It has the same effect as `.single'.  The exact kind of floating point
  1020. numbers emitted depends on how `as' is configured.  *Note Machine
  1021. Dependencies::.
  1022.  
  1023. 
  1024. File: as.info,  Node: Global,  Next: hword,  Prev: Float,  Up: Pseudo Ops
  1025.  
  1026. `.global SYMBOL', `.globl SYMBOL'
  1027. =================================
  1028.  
  1029.    `.global' makes the symbol visible to `ld'.  If you define SYMBOL in
  1030. your partial program, its value is made available to other partial
  1031. programs that are linked with it.  Otherwise, SYMBOL takes its
  1032. attributes from a symbol of the same name from another file linked into
  1033. the same program.
  1034.  
  1035.    Both spellings (`.globl' and `.global') are accepted, for
  1036. compatibility with other assemblers.
  1037.  
  1038.    On the HPPA, `.global' is not always enough to make it accessible to
  1039. other partial programs.  You may need the HPPA-only `.EXPORT' directive
  1040. as well.  *Note HPPA Assembler Directives: HPPA Directives.
  1041.  
  1042. 
  1043. File: as.info,  Node: hword,  Next: Ident,  Prev: Global,  Up: Pseudo Ops
  1044.  
  1045. `.hword EXPRESSIONS'
  1046. ====================
  1047.  
  1048.    This expects zero or more EXPRESSIONS, and emits a 16 bit number for
  1049. each.
  1050.  
  1051.    This directive is a synonym for `.short'; depending on the target
  1052. architecture, it may also be a synonym for `.word'.
  1053.  
  1054. 
  1055. File: as.info,  Node: Ident,  Next: If,  Prev: hword,  Up: Pseudo Ops
  1056.  
  1057. `.ident'
  1058. ========
  1059.  
  1060.    This directive is used by some assemblers to place tags in object
  1061. files.  `as' simply accepts the directive for source-file compatibility
  1062. with such assemblers, but does not actually emit anything for it.
  1063.  
  1064. 
  1065. File: as.info,  Node: If,  Next: Include,  Prev: Ident,  Up: Pseudo Ops
  1066.  
  1067. `.if ABSOLUTE EXPRESSION'
  1068. =========================
  1069.  
  1070.    `.if' marks the beginning of a section of code which is only
  1071. considered part of the source program being assembled if the argument
  1072. (which must be an ABSOLUTE EXPRESSION) is non-zero.  The end of the
  1073. conditional section of code must be marked by `.endif' (*note `.endif':
  1074. Endif.); optionally, you may include code for the alternative
  1075. condition, flagged by `.else' (*note `.else': Else.).
  1076.  
  1077.    The following variants of `.if' are also supported:
  1078. `.ifdef SYMBOL'
  1079.      Assembles the following section of code if the specified SYMBOL
  1080.      has been defined.
  1081.  
  1082. `.ifndef SYMBOL'
  1083. `.ifnotdef SYMBOL'
  1084.      Assembles the following section of code if the specified SYMBOL
  1085.      has not been defined.  Both spelling variants are equivalent.
  1086.  
  1087. 
  1088. File: as.info,  Node: Include,  Next: Int,  Prev: If,  Up: Pseudo Ops
  1089.  
  1090. `.include "FILE"'
  1091. =================
  1092.  
  1093.    This directive provides a way to include supporting files at
  1094. specified points in your source program.  The code from FILE is
  1095. assembled as if it followed the point of the `.include'; when the end
  1096. of the included file is reached, assembly of the original file
  1097. continues.  You can control the search paths used with the `-I'
  1098. command-line option (*note Command-Line Options: Invoking.).  Quotation
  1099. marks are required around FILE.
  1100.  
  1101. 
  1102. File: as.info,  Node: Int,  Next: Irp,  Prev: Include,  Up: Pseudo Ops
  1103.  
  1104. `.int EXPRESSIONS'
  1105. ==================
  1106.  
  1107.    Expect zero or more EXPRESSIONS, of any section, separated by commas.
  1108. For each expression, emit a number that, at run time, is the value of
  1109. that expression.  The byte order and bit size of the number depends on
  1110. what kind of target the assembly is for.
  1111.  
  1112. 
  1113. File: as.info,  Node: Irp,  Next: Irpc,  Prev: Int,  Up: Pseudo Ops
  1114.  
  1115. `.irp SYMBOL,VALUES'...
  1116. =======================
  1117.  
  1118.    Evaluate a sequence of statements assigning different values to
  1119. SYMBOL.  The sequence of statements starts at the `.irp' directive, and
  1120. is terminated by an `.endr' directive.  For each VALUE, SYMBOL is set
  1121. to VALUE, and the sequence of statements is assembled.  If no VALUE is
  1122. listed, the sequence of statements is assembled once, with SYMBOL set
  1123. to the null string.  To refer to SYMBOL within the sequence of
  1124. statements, use \SYMBOL.
  1125.  
  1126.    For example, assembling
  1127.  
  1128.              .irp    param,1,2,3
  1129.              move    d\param,sp@-
  1130.              .endr
  1131.  
  1132.    is equivalent to assembling
  1133.  
  1134.              move    d1,sp@-
  1135.              move    d2,sp@-
  1136.              move    d3,sp@-
  1137.  
  1138. 
  1139. File: as.info,  Node: Irpc,  Next: Lcomm,  Prev: Irp,  Up: Pseudo Ops
  1140.  
  1141. `.irpc SYMBOL,VALUES'...
  1142. ========================
  1143.  
  1144.    Evaluate a sequence of statements assigning different values to
  1145. SYMBOL.  The sequence of statements starts at the `.irpc' directive,
  1146. and is terminated by an `.endr' directive.  For each character in VALUE,
  1147. SYMBOL is set to the character, and the sequence of statements is
  1148. assembled.  If no VALUE is listed, the sequence of statements is
  1149. assembled once, with SYMBOL set to the null string.  To refer to SYMBOL
  1150. within the sequence of statements, use \SYMBOL.
  1151.  
  1152.    For example, assembling
  1153.  
  1154.              .irpc    param,123
  1155.              move    d\param,sp@-
  1156.              .endr
  1157.  
  1158.    is equivalent to assembling
  1159.  
  1160.              move    d1,sp@-
  1161.              move    d2,sp@-
  1162.              move    d3,sp@-
  1163.  
  1164. 
  1165. File: as.info,  Node: Lcomm,  Next: Lflags,  Prev: Irpc,  Up: Pseudo Ops
  1166.  
  1167. `.lcomm SYMBOL , LENGTH'
  1168. ========================
  1169.  
  1170.    Reserve LENGTH (an absolute expression) bytes for a local common
  1171. denoted by SYMBOL.  The section and value of SYMBOL are those of the
  1172. new local common.  The addresses are allocated in the bss section, so
  1173. that at run-time the bytes start off zeroed.  SYMBOL is not declared
  1174. global (*note `.global': Global.), so is normally not visible to `ld'.
  1175.  
  1176.    The syntax for `.lcomm' differs slightly on the HPPA.  The syntax is
  1177. `SYMBOL .lcomm, LENGTH'; SYMBOL is optional.
  1178.  
  1179. 
  1180. File: as.info,  Node: Lflags,  Next: Line,  Prev: Lcomm,  Up: Pseudo Ops
  1181.  
  1182. `.lflags'
  1183. =========
  1184.  
  1185.    `as' accepts this directive, for compatibility with other
  1186. assemblers, but ignores it.
  1187.  
  1188. 
  1189. File: as.info,  Node: Line,  Next: Ln,  Prev: Lflags,  Up: Pseudo Ops
  1190.  
  1191. `.line LINE-NUMBER'
  1192. ===================
  1193.  
  1194.    Change the logical line number.  LINE-NUMBER must be an absolute
  1195. expression.  The next line has that logical line number.  Therefore any
  1196. other statements on the current line (after a statement separator
  1197. character) are reported as on logical line number LINE-NUMBER - 1.  One
  1198. day `as' will no longer support this directive: it is recognized only
  1199. for compatibility with existing assembler programs.
  1200.  
  1201.    *Warning:* In the AMD29K configuration of as, this command is not
  1202. available; use the synonym `.ln' in that context.
  1203.  
  1204.    Even though this is a directive associated with the `a.out' or
  1205. `b.out' object-code formats, `as' still recognizes it when producing
  1206. COFF output, and treats `.line' as though it were the COFF `.ln' *if*
  1207. it is found outside a `.def'/`.endef' pair.
  1208.  
  1209.    Inside a `.def', `.line' is, instead, one of the directives used by
  1210. compilers to generate auxiliary symbol information for debugging.
  1211.  
  1212. 
  1213. File: as.info,  Node: Linkonce,  Next: List,  Prev: Ln,  Up: Pseudo Ops
  1214.  
  1215. `.linkonce [TYPE]'
  1216. ==================
  1217.  
  1218.    Mark the current section so that the linker only includes a single
  1219. copy of it.  This may be used to include the same section in several
  1220. different object files, but ensure that the linker will only include it
  1221. once in the final output file.  The `.linkonce' pseudo-op must be used
  1222. for each instance of the section.  Duplicate sections are detected
  1223. based on the section name, so it should be unique.
  1224.  
  1225.    This directive is only supported by a few object file formats; as of
  1226. this writing, the only object file format which supports it is the
  1227. Portable Executable format used on Windows NT.
  1228.  
  1229.    The TYPE argument is optional.  If specified, it must be one of the
  1230. following strings.  For example:
  1231.      .linkonce same_size
  1232.    Not all types may be supported on all object file formats.
  1233.  
  1234. `discard'
  1235.      Silently discard duplicate sections.  This is the default.
  1236.  
  1237. `one_only'
  1238.      Warn if there are duplicate sections, but still keep only one copy.
  1239.  
  1240. `same_size'
  1241.      Warn if any of the duplicates have different sizes.
  1242.  
  1243. `same_contents'
  1244.      Warn if any of the duplicates do not have exactly the same
  1245.      contents.
  1246.  
  1247. 
  1248. File: as.info,  Node: Ln,  Next: Linkonce,  Prev: Line,  Up: Pseudo Ops
  1249.  
  1250. `.ln LINE-NUMBER'
  1251. =================
  1252.  
  1253.    `.ln' is a synonym for `.line'.
  1254.  
  1255. 
  1256. File: as.info,  Node: MRI,  Next: Nolist,  Prev: Macro,  Up: Pseudo Ops
  1257.  
  1258. `.mri VAL'
  1259. ==========
  1260.  
  1261.    If VAL is non-zero, this tells `as' to enter MRI mode.  If VAL is
  1262. zero, this tells `as' to exit MRI mode.  This change affects code
  1263. assembled until the next `.mri' directive, or until the end of the
  1264. file.  *Note MRI mode: M.
  1265.  
  1266. 
  1267. File: as.info,  Node: List,  Next: Long,  Prev: Linkonce,  Up: Pseudo Ops
  1268.  
  1269. `.list'
  1270. =======
  1271.  
  1272.    Control (in conjunction with the `.nolist' directive) whether or not
  1273. assembly listings are generated.  These two directives maintain an
  1274. internal counter (which is zero initially).   `.list' increments the
  1275. counter, and `.nolist' decrements it.  Assembly listings are generated
  1276. whenever the counter is greater than zero.
  1277.  
  1278.    By default, listings are disabled.  When you enable them (with the
  1279. `-a' command line option; *note Command-Line Options: Invoking.), the
  1280. initial value of the listing counter is one.
  1281.  
  1282. 
  1283. File: as.info,  Node: Long,  Next: Macro,  Prev: List,  Up: Pseudo Ops
  1284.  
  1285. `.long EXPRESSIONS'
  1286. ===================
  1287.  
  1288.    `.long' is the same as `.int', *note `.int': Int..
  1289.  
  1290. 
  1291. File: as.info,  Node: Macro,  Next: MRI,  Prev: Long,  Up: Pseudo Ops
  1292.  
  1293. `.macro'
  1294. ========
  1295.  
  1296.    The commands `.macro' and `.endm' allow you to define macros that
  1297. generate assembly output.  For example, this definition specifies a
  1298. macro `sum' that puts a sequence of numbers into memory:
  1299.  
  1300.              .macro  sum from=0, to=5
  1301.              .long   \from
  1302.              .if     \to-\from
  1303.              sum     "(\from+1)",\to
  1304.              .endif
  1305.              .endm
  1306.  
  1307. With that definition, `SUM 0,5' is equivalent to this assembly input:
  1308.  
  1309.              .long   0
  1310.              .long   1
  1311.              .long   2
  1312.              .long   3
  1313.              .long   4
  1314.              .long   5
  1315.  
  1316. `.macro MACNAME'
  1317. `.macro MACNAME MACARGS ...'
  1318.      Begin the definition of a macro called MACNAME.  If your macro
  1319.      definition requires arguments, specify their names after the macro
  1320.      name, separated by commas or spaces.  You can supply a default
  1321.      value for any macro argument by following the name with `=DEFLT'.
  1322.      For example, these are all valid `.macro' statements:
  1323.  
  1324.     `.macro comm'
  1325.           Begin the definition of a macro called `comm', which takes no
  1326.           arguments.
  1327.  
  1328.     `.macro plus1 p, p1'
  1329.     `.macro plus1 p p1'
  1330.           Either statement begins the definition of a macro called
  1331.           `plus1', which takes two arguments; within the macro
  1332.           definition, write `\p' or `\p1' to evaluate the arguments.
  1333.  
  1334.     `.macro reserve_str p1=0 p2'
  1335.           Begin the definition of a macro called `reserve_str', with two
  1336.           arguments.  The first argument has a default value, but not
  1337.           the second.  After the definition is complete, you can call
  1338.           the macro either as `reserve_str A,B' (with `\p1' evaluating
  1339.           to A and `\p2' evaluating to B), or as `reserve_str ,B' (with
  1340.           `\p1' evaluating as the default, in this case `0', and `\p2'
  1341.           evaluating to B).
  1342.  
  1343.      When you call a macro, you can specify the argument values either
  1344.      by position, or by keyword.  For example, `sum 9,17' is equivalent
  1345.      to `sum to=17, from=9'.
  1346.  
  1347. `.endm'
  1348.      Mark the end of a macro definition.
  1349.  
  1350. `.exitm'
  1351.      Exit early from the current macro definition.
  1352.  
  1353. `\@'
  1354.      `as' maintains a counter of how many macros it has executed in
  1355.      this pseudo-variable; you can copy that number to your output with
  1356.      `\@', but *only within a macro definition*.
  1357.  
  1358. 
  1359. File: as.info,  Node: Nolist,  Next: Octa,  Prev: MRI,  Up: Pseudo Ops
  1360.  
  1361. `.nolist'
  1362. =========
  1363.  
  1364.    Control (in conjunction with the `.list' directive) whether or not
  1365. assembly listings are generated.  These two directives maintain an
  1366. internal counter (which is zero initially).   `.list' increments the
  1367. counter, and `.nolist' decrements it.  Assembly listings are generated
  1368. whenever the counter is greater than zero.
  1369.  
  1370. 
  1371. File: as.info,  Node: Octa,  Next: Org,  Prev: Nolist,  Up: Pseudo Ops
  1372.  
  1373. `.octa BIGNUMS'
  1374. ===============
  1375.  
  1376.    This directive expects zero or more bignums, separated by commas.
  1377. For each bignum, it emits a 16-byte integer.
  1378.  
  1379.    The term "octa" comes from contexts in which a "word" is two bytes;
  1380. hence *octa*-word for 16 bytes.
  1381.  
  1382. 
  1383. File: as.info,  Node: Org,  Next: P2align,  Prev: Octa,  Up: Pseudo Ops
  1384.  
  1385. `.org NEW-LC , FILL'
  1386. ====================
  1387.  
  1388.    Advance the location counter of the current section to NEW-LC.
  1389. nEW-LC is either an absolute expression or an expression with the same
  1390. section as the current subsection.  That is, you can't use `.org' to
  1391. cross sections: if NEW-LC has the wrong section, the `.org' directive
  1392. is ignored.  To be compatible with former assemblers, if the section of
  1393. NEW-LC is absolute, `as' issues a warning, then pretends the section of
  1394. NEW-LC is the same as the current subsection.
  1395.  
  1396.    `.org' may only increase the location counter, or leave it
  1397. unchanged; you cannot use `.org' to move the location counter backwards.
  1398.  
  1399.    Because `as' tries to assemble programs in one pass, NEW-LC may not
  1400. be undefined.  If you really detest this restriction we eagerly await a
  1401. chance to share your improved assembler.
  1402.  
  1403.    Beware that the origin is relative to the start of the section, not
  1404. to the start of the subsection.  This is compatible with other people's
  1405. assemblers.
  1406.  
  1407.    When the location counter (of the current subsection) is advanced,
  1408. the intervening bytes are filled with FILL which should be an absolute
  1409. expression.  If the comma and FILL are omitted, FILL defaults to zero.
  1410.  
  1411. 
  1412. File: as.info,  Node: P2align,  Next: Psize,  Prev: Org,  Up: Pseudo Ops
  1413.  
  1414. `.p2align[wl] ABS-EXPR , ABS-EXPR'
  1415. ==================================
  1416.  
  1417.    Pad the location counter (in the current subsection) to a particular
  1418. storage boundary.  The first expression (which must be absolute) is the
  1419. number of low-order zero bits the location counter must have after
  1420. advancement.  For example `.p2align 3' advances the location counter
  1421. until it a multiple of 8.  If the location counter is already a
  1422. multiple of 8, no change is needed.
  1423.  
  1424.    The second expression (also absolute) gives the value to be stored in
  1425. the padding bytes.  It (and the comma) may be omitted.  If it is
  1426. omitted, the padding bytes are zero.
  1427.  
  1428.    The `.p2alignw' and `.p2alignl' directives are variants of the
  1429. `.p2align' directive.  The `.p2alignw' directive treats the fill
  1430. pattern as a two byte word value.  The `.p2alignl' directives treats the
  1431. fill pattern as a four byte longword value.  For example, `.p2alignw
  1432. 2,0x368d' will align to a multiple of 4.  If it skips two bytes, they
  1433. will be filled in with the value 0x368d (the exact placement of the
  1434. bytes depends upon the endianness of the processor).  If it skips 1 or
  1435. 3 bytes, the fill value is undefined.
  1436.  
  1437.